﻿//
//  Windows_libc
//
//  Created by  cc_team(陈旭，陈曦) qq:511272827.
//  Copyright 2011 cc_team. All rights reserved.
//
#ifndef CC_FILE_H
#define CC_FILE_H

#include "cc_common.h"
#include "cc_stdlib.h"
#include <stdio.h>

// the end of file
#define		EOF						-1

__BEGIN_DECLS

int __cdecl cc_mkdir(
	const char *path
);

int __cdecl cc_rmdir(
	const char *path
);

int __cdecl cc_rename(
	const char *srcName,
	const char *destName
);

// delete a file
int __cdecl cc_remove(
	const char *fileName
);

// get the size of file
int __cdecl cc_getFileSize(
	const char *fileName
);

// read all data of file to buffer
// note that:you should make sure the buf's size is bigger or than fileSize argument. 
void __cdecl cc_readFileToBuf(
	const char	*fileName,
	char	    *buf,
	int			*error
);

__END_DECLS

#endif